<script lang="ts" setup>
import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons-vue'
import { useMenuSetting } from '@/hooks/setting/useMenuSetting'
import { useDesign } from '@/hooks/web/useDesign'

defineOptions({ name: 'LayoutTrigger' })
const { getCollapsed, toggleCollapsed } = useMenuSetting()
const { prefixCls } = useDesign('layout-header-trigger')
</script>

<template>
  <span :class="[prefixCls]" @click="toggleCollapsed">
    <MenuUnfoldOutlined v-if="getCollapsed" />
    <MenuFoldOutlined v-else />
  </span>
</template>
